package org.esprit.ocm.client.rpc.ec2;

import org.esprit.ocm.dto.impl.AwsCredentialsDto;
import org.esprit.ocm.dto.impl.ServerDto;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("RegistrationService.rpc")
public interface RegistrationService extends RemoteService {

	/**
	 * Register a new AMI from a bucket on S3
	 * 
	 * @param location
	 *            the location on S3
	 * @return the unique imageId of the newly registered AMI.
	 */
	public String registerImage(String location, ServerDto server, AwsCredentialsDto credentials);

	/**
	 * Deregister an AMI Image.
	 * 
	 * @param imageId
	 *            the ID of the image to deregister.
	 * 
	 * @return true if successfull, false else
	 */
	public boolean deregisterImage(String imageId, ServerDto server, AwsCredentialsDto credentials);
}
